<template>
  <el-row :gutter="20" class="core-indicators">
    <el-col
      v-for="(item, index) in indicators"
      :key="index"
      :xs="24"
      :sm="12"
      :md="8"
      :lg="4"
    >
      <el-card class="indicator-card" shadow="hover">
        <div class="indicator-icon">
          <component :is="item.icon" style="font-size: 24px" />
        </div>
        <div class="indicator-value">{{ item.value }}</div>
        <div class="indicator-label">{{ item.label }}</div>
      </el-card>
    </el-col>
  </el-row>
</template>

<script setup>
defineProps({
  indicators: {
    type: Array,
    required: true,
  },
});
</script>

<style scoped>
.core-indicators {
  margin-bottom: 20px;
}
.indicator-card {
  text-align: center;
  padding: 16px 0;
}
.indicator-icon {
  margin-bottom: 8px;
  color: #409eff;
}
.indicator-value {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 4px;
}
.indicator-label {
  font-size: 14px;
  color: #606266;
}
</style>
